import QtQuick 2.0
import "./Keyboard"

Rectangle {
    id:root
    height: parent.height
    width: parent.width
    //anchors.fill: parent
    signal enter()
    property Item rp: root
    property string user: input_usr.valeKey
    property string pass: input_pass.valeKey
    Image {
        id: login
        source: "login.png"
        anchors.centerIn: parent
    }
    Text{
        id:user
        text: "User"
        anchors.margins: 20
        anchors.right: input_usr.left
        anchors.verticalCenter:  input_usr.verticalCenter
    }

    VTextInput{
        id:input_usr
        anchors.horizontalCenter: parent.horizontalCenter
        y:100
        width: 200
        height: 50
        window_x: x
        window_y: y
        maxwindow_h : parent.height
        maxwindow_w: parent.width
        pass: false
        txt:"Username"
    }
    Text{
        id:pass
        text: "Pass"
        anchors.right: input_pass.left
        anchors.margins: 20
        anchors.verticalCenter:  input_pass.verticalCenter
    }

    VTextInput{
        id:input_pass
        anchors.horizontalCenter: parent.horizontalCenter
        anchors.top:input_usr.bottom
        anchors.margins: 20
        width: 200
        height: 50
        window_x: x
        window_y: y
        maxwindow_h : parent.height
        maxwindow_w: parent.width
        pass: true
        txt:"Password"
        onEnter: {
            root.enter();
        }

    }
    function clear(){

        input_pass.valeKey=""
        input_pass.pasKey=""

        input_usr.valeKey=""
        input_usr.pasKey=""
        input_pass.txt="Password"
        input_usr.txt="User"
    }

}
